#include <iostream>
using namespace std;

int main()
{
    long A, B, C, D, E, F;
    for (A = 3; A <= 9; A++)
    {
        for (D = 1; D <= 9; D++)
        {
            E = D * 100000 + D * 10000 + D * 1000 + D * 100 + D * 10 + D;
            std::cout << "当前计算，A = " << A << ", D = " << D << ", E = " << E << std::endl;
            if (E % A == 0)
            {
                F = E / A;
                std::cout << "E能被A整除，F = " << F << std::endl;
                if (F / 10000 == A && (F % 100) / 10 == A && F / 1000 == F % 10)
                {
                    std::cout << F << "*" << A << "=" << E << std::endl;
                }
            }
        }
    }

    return 0;
}